<?php if(count($messages)): ?>
<?php foreach($messages as $message):?>
<li>
    <a href="/message/inbox/<?php echo $message->id ?>">
        <div class="list_main_container <?php if($message->date_read == null) echo 'unread' ?> ">
            <img src="<?php echo $message->photo ?>" alt="<?php echo $message->name.' '.$message->surname ?>">
            <div style="width: 280px">
                <p class="mini_name ellipsis_character"><?php echo $message->name.' '.$message->surname ?></p>
                <p class="mini_info ellipsis_word"><?php echo $message->subject ?></p>
            </div>
        </div>
    </a> 
</li>
<?php endforeach ?>
<?php else: ?>
            <li>
                <div class="list_main_container">
                    <div class="list_standard_entre" style="text-align: center; float: none; padding-left: 0px"><?php echo __('no messages in inbox to show')?></div>                   
                </div>
            </li>
<?php endif ?>